From dfa88ef9c79f57580cbe77b21ca259e8530c70ec Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 9 Dec 1998 17:31:52 +0000 Subject: [PATCH] Add in missing 'flags' field to target list. Wed Dec 9 12:23:30 1998 Owen Taylor * gtk/testselection.c (main): Add in missing 'flags' field to target list. * gdk/gdkproperty.c (gdk_atom_intern): Actually add the atoms to the local cache. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gdk/gdkproperty.c | 8 +++++++- gdk/x11/gdkproperty-x11.c | 8 +++++++- gtk/testselection.c | 6 +++--- tests/testselection.c | 6 +++--- 11 files changed, 76 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3ee4d70703..d42a8ee051 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Dec 9 12:23:30 1998 Owen Taylor + + * gtk/testselection.c (main): Add in missing 'flags' + field to target list. + + * gdk/gdkproperty.c (gdk_atom_intern): Actually + add the atoms to the local cache. + Wed Dec 9 04:57:31 PST 1998 Manish Singh * gdk/gdkprivate.h: put text after #endif in comment diff --git a/gdk/gdkproperty.c b/gdk/gdkproperty.c index 5b18ba71e7..12f0420dde 100644 --- a/gdk/gdkproperty.c +++ b/gdk/gdkproperty.c @@ -34,7 +34,13 @@ gdk_atom_intern (const gchar *atom_name, retval = GPOINTER_TO_UINT (g_hash_table_lookup (atom_hash, atom_name)); if (!retval) - retval = XInternAtom (gdk_display, atom_name, only_if_exists); + { + retval = XInternAtom (gdk_display, atom_name, only_if_exists); + + g_hash_table_insert (atom_hash, + g_strdup (atom_name), + GUINT_TO_POINTER (retval)); + } return retval; } diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 5b18ba71e7..12f0420dde 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -34,7 +34,13 @@ gdk_atom_intern (const gchar *atom_name, retval = GPOINTER_TO_UINT (g_hash_table_lookup (atom_hash, atom_name)); if (!retval) - retval = XInternAtom (gdk_display, atom_name, only_if_exists); + { + retval = XInternAtom (gdk_display, atom_name, only_if_exists); + + g_hash_table_insert (atom_hash, + g_strdup (atom_name), + GUINT_TO_POINTER (retval)); + } return retval; } diff --git a/gtk/testselection.c b/gtk/testselection.c index e88d44347c..765f918f28 100644 --- a/gtk/testselection.c +++ b/gtk/testselection.c @@ -384,9 +384,9 @@ main (int argc, char *argv[]) GtkWidget *hbox; static GtkTargetEntry targetlist[] = { - { "STRING", STRING }, - { "TEXT", TEXT }, - { "COMPOUND_TEXT", COMPOUND_TEXT } + { "STRING", 0, STRING }, + { "TEXT", 0, TEXT }, + { "COMPOUND_TEXT", 0, COMPOUND_TEXT } }; static gint ntargets = sizeof(targetlist) / sizeof(targetlist[0]); diff --git a/tests/testselection.c b/tests/testselection.c index e88d44347c..765f918f28 100644 --- a/tests/testselection.c +++ b/tests/testselection.c @@ -384,9 +384,9 @@ main (int argc, char *argv[]) GtkWidget *hbox; static GtkTargetEntry targetlist[] = { - { "STRING", STRING }, - { "TEXT", TEXT }, - { "COMPOUND_TEXT", COMPOUND_TEXT } + { "STRING", 0, STRING }, + { "TEXT", 0, TEXT }, + { "COMPOUND_TEXT", 0, COMPOUND_TEXT } }; static gint ntargets = sizeof(targetlist) / sizeof(targetlist[0]); -- 2.30.2